from mmorganizer.games.models import Game, Class, Role, Serveur
from mmorganizer.characters.models import Personnage
from django.contrib import admin

class ClassesInline(admin.TabularInline):
    model = Class
    extra = 1
    
class RolesInline(admin.TabularInline):
    model = Role
    extra = 1

class GameAdmin(admin.ModelAdmin):
    inlines = [ClassesInline, RolesInline]
    
class PersonnageInline(admin.TabularInline):
    model = Personnage
    extra = 1

class ServeurAdmin(admin.ModelAdmin):
    inlines = [PersonnageInline]
    
admin.site.register(Game, GameAdmin)
admin.site.register(Serveur,ServeurAdmin)
